It has been useful in the past to truncate plain text emails to avoid sending lots of unneeded data to devices. For example, an email that is the subject of a chain of numerous reply and/or forward actions may have the content of the previous emails of the chain appended to the end of the current email. Email attachments can also make emails grow very large. Some email clients, such as those on mobile devices, may access a truncated version of these long emails when downloading the email to the device.
An email client that truncates a plain text message may download data of an email up to some predefined limit. The full message (or at least the portion that was not downloaded) may be retained on the email server for further downloading if the user so desires. This saves storage space on the client device, and may reduce network/processor bandwidth that would otherwise be needed to download a long email. In such a scenario, the non-downloaded portion may remain on the server, and so it is possible no data is discarded due to the truncation.
When a user replies to or forwards a plain text email that has been truncated, they may want to place additional text in a responsive email formed based on the truncated email. The response email may include the truncated part of the email and other data added by an email client, such as date the original email was sent, the original sender/receiver, etc. Because users often insert new text at the beginning of the email, this works acceptably in most cases. In such a case the user-added text will not affect the form or content of the truncated text.
Plain text emails can be arbitrarily truncated without affecting their rendering, because such messages have no formatting. Even though email is still commonly sent as plain text, other message formats are increasingly used instead of plain text. These other formats can provide features such as font/layout specification, embedded graphics/links, etc. One email message format that includes these features is Hypertext Markup Language (HTML). The HTML specification has its origins in serving Web content, e.g., documents served from Hypertext Transport Protocol (HTTP) servers.
Truncation techniques for plain text may not work reliably with HTML email. Because HTML email is a markup language, HTML documents require certain elements be included in certain orders. Such messages can't be truncated at an arbitrary point and still guarantee that it will be a properly formed markup language document afterward.
Regardless of the difficulties involved in truncating emails, there are benefits in this practice (e.g., reducing bandwidth and storage on clients). Given the increasing use of formatted messages, such truncation should able to handle formatted messages without destroying the characteristics (e.g., formatting) that make these emails so desirable in the first place. Nor should truncation make such documents unparseable by a document renderer. The present disclosure discusses these and other needs in the art.